<template>
  <div class="app-container">
    <el-form :inline="true" :model="queryForm" class="demo-form-inline">
      <el-form-item label="运用范围">
        <el-input v-model="queryForm.catalog" placeholder="运用范围"></el-input>
      </el-form-item>
      <el-form-item label="枚举类型">
        <el-input v-model="queryForm.type" placeholder="枚举类型"></el-input>
      </el-form-item>
      <el-form-item>
        <el-button type="primary" @click="queryData">查询</el-button>
      </el-form-item>
    </el-form>
    <hl-table ref="HlTable" :data-url="dataUrl" :query-form="queryForm" :button-list="buttonList" @add="addData" @delete="deleteData">
      <el-table-column type="selection" align="center" width="55"></el-table-column>
      <el-table-column align="center" label="ID" prop="id" width="55"></el-table-column>
      <el-table-column label="运用范围" prop="catalog"></el-table-column>
      <el-table-column label="枚举类型" prop="type"></el-table-column>
      <el-table-column label="枚举名称" prop="name"></el-table-column>
      <el-table-column label="枚举值" prop="value"></el-table-column>
      <el-table-column label="排序" prop="sort"></el-table-column>
      <el-table-column label="备注" prop="remarks"></el-table-column>
      <el-table-column label="操作" align="center" width="100px">
        <template slot-scope="scope">
          <el-button size="mini" @click="handleEdit(scope.$index, scope.row)">编辑</el-button>
        </template>
      </el-table-column>
    </hl-table>
  </div>
</template>

<script>
import HlTable from '@/components/HlTable'
export default {
  name: 'EnumConfig',
  components: { HlTable },
  data() {
    return {
      dataUrl: 'frontend/api/enum/tableList',
      buttonList: [
        { type: 'primary', icon: 'el-icon-plus', click: 'add', clickName: '新增' },
        { type: 'danger', icon: 'el-icon-delete', click: 'delete', clickName: '删除' }
      ],
      queryForm: {}
    }
  },
  created() {
  },
  methods: {
    addData () {
    },
    deleteData () {},
    queryData () {
      this.$refs.HlTable.getTable()
    },
    handleEdit () {}
  }
}
</script>

<style scoped>

</style>
